package com.ds.infra.rpc.core.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * RPC客户端专属配置
 *
 * @author WeiShaoying
 */
@Data
@ConfigurationProperties(prefix = "rpc.client")
public class ClientConfig {
    /**
     * 请求超时时间(ms) (默认5000ms)
     */
    private int requestTimeout = 5000;

    /**
     * 失败重试次数 (默认2次)
     */
    private int retryTimes = 2;

    /**
     * 连接池最大数量 (默认16)
     */
    private int connectionPoolSize = 16;

    /**
     * 心跳间隔(ms) (默认30000ms)
     */
    private int heartbeatInterval = 30000;
}
